package cn.guxinhu.billsystem.user.service.impl;

import cn.guxinhu.billsystem.user.mapper.IUserMapper;
import cn.guxinhu.billsystem.user.pojo.BillUser;
import cn.guxinhu.billsystem.user.service.IUserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Guxinhu
 * @create 2021-06-21 14:40
 */
@Service
public class UserLoginServiceImpl implements IUserLoginService {
    /**
     * @Description: 登录的Servier层
     * @Method: LoginServier.login()
     * @Param: iMapper(IMapper) -- mybatis(sql)映射接口
     * userQueryVo(UserQueryVo) -- 前端传入的实体类
     * @Return: user(User) -- 数据库实体类
     * @Author: Guxinhu
     * @Date Created in 2020/08/19 11:37
     */
    @Autowired
    private BillUser user;
    @Autowired
    private IUserMapper userMapper;

    public BillUser login(String userName) {
        user = userMapper.findByName(userName);
        return user;
    }
}
